package com.itheima;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/load")
public class load extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setCharacterEncoding("utf-8");
        String str =        " <table border='1'>"+
                            "    <tr  align='center'>"+
                            "        <th>商品名称</th>"+
                            "        <th>商品数量</th>"+
                            "        <th>商品价格</th>"+
                            "    </tr>"+
                            "    <tr  align='center'>"+
                            "        <td>肥皂</td>"+
                            "        <td>50</td>"+
                            "        <td>4.99</td>"+
                            "    </tr>"+
                            "    <tr  align='center'>"+
                            "        <td>蜡烛</td>"+
                            "        <td>99</td>"+
                            "        <td>1</td>"+
                            "    </tr>"+
                            "    <tr  align='center'>"+
                            "        <td>皮鞭</td>"+
                            "        <td>150</td>"+
                            "        <td>9.9</td>"+
                            "    </tr>"+
                            "</table>               ";
        response.getWriter().write(str);


    }
}
